package javalession;

import java.util.Scanner;

public class Lession1 {

	private static Scanner scan;
	public static void main(String[] args) {
		scan = new Scanner (System.in);
		System.out.println("请输入正方形边长：");
		int a =scan.nextInt();
		for (int i = 0; i < a; i++) {
			for (int j = 0; j < a ;j++) {
				if (i==0||i==a-1||j==0||j==a-1) {
					System.out.print(" *");
				}else {
					System.out.print("  ");
				}
			}
			System.out.println();
		}
	}

}